//package com.xihu.socielserver.controller;
//
//import com.alibaba.csp.sentinel.annotation.SentinelResource;
//import com.xihu.society.service.FeignService;
//import feign.FeignException;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.SpringApplication;
//import org.springframework.cloud.context.config.annotation.RefreshScope;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//@RestController
//@RequestMapping("/one")
//@RefreshScope //开启配置文件刷新
//public class SocielController {
//    public static void main(String[] args){
//        SpringApplication.run(SocielController.class, args);
//    }
//    @Autowired
//    private FeignService feignService;
////    @Value("${author}")
////    private String author;
//
//    @GetMapping("/test")
//    @SentinelResource(value = "testResource", blockHandler = "handlerTest")
//    public String hello() {
//        return "我是服务one";
//    }
//    public String handlerTest() {
//        return "别再调用啦";
//    }
//
//    @GetMapping("/useTwo")
//    public String useTwo() {
//        String res = "";
//        try {
//            res = feignService.test();
//        } catch (FeignException e) {
//            System.out.println(e.getMessage());
//        }
//        return "one-server调用了two:" + res;
//    }
//}